package cv.ltq.service;

import cv.ltq.dao.StudentRepositroy;
import cv.ltq.entiy.Student;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StudentService {
   @Autowired
    StudentRepositroy studentRepositroy;


    public List<Student> getAll() {
        return studentRepositroy.getAll();
    }


    public int add(Student student) {
        return studentRepositroy.add(student);
    }


    public int del(int id) {
        return studentRepositroy.del(id);
    }


    public int update(Student student) {
        return studentRepositroy.update(student);
    }


    public Student getId(int id) {
        return studentRepositroy.getId(id);
    }





}
